<template>
  <div>
    <div class="first_title">结算信息</div>
    <div>
      <div class="infocontent_line">
        <el-form-item label="结算类型">
          <el-radio v-model="Cpnform.sttlTyp" label="0">对公账户</el-radio>
          <el-radio v-model="Cpnform.sttlTyp" label="1">对私法人账户</el-radio>
          <el-radio v-model="Cpnform.sttlTyp" label="2">对私授权结算</el-radio>
        </el-form-item>
      </div>

      <div class="infocontent_line">
        <div class="cpninfo">
          <el-form-item label="结算账户名称" prop="sttlActNm">
            <el-input v-model="Cpnform.sttlActNm"></el-input>
          </el-form-item>
          <el-form-item label="结算账户卡号" prop="sttlAct">
            <el-input type="number" v-model="Cpnform.sttlAct"></el-input>
          </el-form-item>
        </div>
      </div>

      <div class="infocontent_line">
        <div>
          <el-form-item label="结算账户开户行信息"  prop="sttlActBnk">
            <el-input
              v-model="Cpnform.sttlActBnk"
              style="width: 595px"
             
            ></el-input>
          </el-form-item>
        </div>
      </div>

      <div class="infocontent_line">
        <div>
          <el-form-item label="开户许可证/开户证明" prop="openActlicence_Url">
            <el-upload
              class="avatar-uploader"
              :action="this.EnclSurebaseurl"
              :show-file-list="false"
              :on-success="OpenActlicence_Success"
            >
              <img
                v-if="
                  Cpnform.openActlicence_Url != '' &&
                  Cpnform.openActlicence_Url != null &&
                  Cpnform.openActlicence_Url != undefined
                "
                width="40"
                height="40"
                :src="Cpnform.openActlicence_Url"
                class="avatar"
              />
              <i v-else class="el-icon-plus avatar-uploader-icon"></i>
            </el-upload>
          </el-form-item>
          <el-form-item>
             <span
              class="spanshow2"
              v-show="
                Cpnform.openActlicence_Url != '' &&
                Cpnform.openActlicence_Url != null &&
                Cpnform.openActlicence_Url != undefined
              "
              @click="shoubigimg(Cpnform.openActlicence_Url)"
              >查看大图</span
            >
          </el-form-item>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import { AjaxToken, TipConfirm } from "@/api/common";
import { SelectAjax } from "@/api/common";
import { Jurisdiction } from "@/api/common";
import sessionStorage from "@/api/Storage";
import commconfig from "@/comm.json";
import "url-search-params-polyfill";
export default {
  props: {
    Cpnform: null,
  },
  data() {
    return {
      chart: null,
      fileList: [],
      EnclSurebaseurl: "",
    };
  },
  watch: {},
  mounted() {},
  created() {
    this.EnclSurebaseurl = commconfig.baseapi + "UploadFileAttch";
  },
  methods: {
    shoubigimg(url) {
      this.Cpnform.showbigdialogVisible = true;
      this.Cpnform.showbigurl = url;
    },
    FileError(err, file, fileList) {},
    OpenActlicence_Success(res, file) {
      //内景照
      this.Cpnform.openActlicence_Url = JSON.parse(res.data)[file.name];
      backstage.EnclsureHand(this, "OpenActlicence", res, file);
    },
  },
};
var backstage = {
  EnclsureHand: function (thisobj, key, res, file, fileurl) {
    var ispush = true;
    var fileurl = JSON.parse(res.data)[file.name];
    thisobj.Cpnform.cpnenclsures.forEach((a) => {
      if (a.key == key) {
        ispush = false;
        a.name = file.name;
        a.uid = file.uid;
        a.data = file.response.data;
        a.fileurl = fileurl;
      }
    });
    if (ispush) {
      thisobj.Cpnform.cpnenclsures.push({
        key: key,
        name: file.name,
        uid: file.uid,
        fileurl: fileurl,
      });
    }
  },
};
</script>
<style lang="scss" scoped>
.spanshow2 {
  position: relative;
  top: 80px;
  left: -25px;
  color: #3b5daf;
  cursor: pointer;
}
</style>
